import Vue from "vue";
import Router from "vue-router";
import Home from "@/components/Home";
import Login from "@/components/Login";
import NotFound from "@/components/NotFound";
import StudentList from "@/components/students/StudentList";
import WorkList from "@/components/students/WorkList";
import DataOverView from "@/components/dataAnalysis/DataOverView";
import MapData from "@/components/dataAnalysis/MapData";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "login",
      meta:{
        isXia:0
      },
      hidden: true
    },
    {
      path: "/login",
      name: "login",
      component: Login,
      meta:{
        isXia:0
      },
      hidden: true
    },
    {
      path: "/home",
      name: "home",
      component: Home,
      meta:{
        isXia:0
      },
      hidden: true
    },
    {
      path: "/sys",
      name: "系统管理",
      component: Home,
      meta:{
        isXia:1
      },
      redirect: '/sys/menus',
      iconClass: "el-icon-document",
      children: [
        {
          path: "menus",
          name: "菜单管理",
          component: () => import("../views/sys/menus.vue"),
          iconClass: "el-icon-document-checked",
        },
        {
          path: "roles",
          name: "角色管理",
          component: () => import("../views/sys/roles.vue"),
          iconClass: "el-icon-document-checked"
        }
      ]
    },
    {
      path: "/user",
      name: "用户管理",
      component: Home,
      redirect: '/user/userInfo',
      iconClass: "el-icon-date",
      meta:{
        isXia:1
      },
      children: [
        {
          path: "userInfo",
          name: "用户管理",
          component: () => import("../views/user/userInfo.vue"),
          iconClass: "el-icon-c-scale-to-original"
        },
        {
          path: "studentInfo",
          name: "学生管理",
          component: () => import("../views/user/studentInfo.vue"),
          iconClass: "el-icon-tickets"
        },
        {
          path: "teacherInfo",
          name: "教师管理",
          component: () => import("../views/user/teacherInfo.vue"),
          iconClass: "el-icon-document-add"
        }
      ]
    },
    {
      path: "/score",
      name: "成绩管理",
      redirect: '/score/scoreList',
      iconClass: "el-icon-document-copy",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "scoreList",
          name: "成绩列表",
          component: () => import("../views/score/scoreInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/course",
      name: "课程管理",
      redirect: '/course/courseList',
      iconClass: "el-icon-notebook-1",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "courseList",
          name: "课程列表",
          component: () => import("../views/course/courseInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/class",
      name: "班级管理",
      redirect: '/class/classList',
      iconClass: "el-icon-school",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "classList",
          name: "班级列表",
          component: () => import("../views/class/classInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/teaching",
      name: "授课管理",
      redirect: '/teaching/teachingList',
      iconClass: "el-icon-pie-chart",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "teachingList",
          name: "授课列表",
          component: () => import("../views/teaching/teachingInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/exam",
      name: "考务管理",
      redirect: '/exam/examList',
      iconClass: "el-icon-watch-1",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "examList",
          name: "考务列表",
          component: () => import("../views/exam/examInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/major",
      name: "专业管理",
      redirect: '/major/majorList',
      iconClass: "el-icon-coin",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "majorList",
          name: "专业列表",
          component: () => import("../views/major/majorInfo.vue"),
        },
      ],
      component: Home,
    },
    {
      path: "/college",
      name: "学院管理",
      redirect: '/college/collegeList',
      iconClass: "el-icon-office-building",
      meta:{
        isXia:0
      },
      children: [
        {
          path: "collegeList",
          name: "学院列表",
          component: () => import("../views/college/collegeInfo.vue"),
        },
      ],
      component: Home,
    },
   
    {
      path: "*",
      name: "NotFound",
      meta:{
        isXia:0
      },
      component: NotFound,
      hidden: true
    }
  ],
  mode: "history"
});
